# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-music
pkgver=3.26.1
pkgrel=1
pkgdesc="Music player and management application"
url="https://wiki.gnome.org/Apps/Music"
arch=(i686 x86_64)
license=(GPL)
depends=(grilo grilo-plugins tracker-miners libdmapsharing libmediaart gtk3 gvfs python-gobject
         python-cairo gst-plugins-base python-requests)
makedepends=(intltool itstool gobject-introspection gnome-common git)
optdepends=('gst-plugins-good: Extra media codecs'
            'gst-plugins-ugly: Extra media codecs'
            'gst-plugins-bad: Extra media codecs'
            'gst-libav: Extra media codecs')
groups=(gnome-extra)
_commit=f5b9fa659180e4e3a5273cb239d113783d196526  # tags/3.26.1^0
source=("git+https://git.gnome.org/browse/gnome-music#commit=$_commit"
        "git+https://git.gnome.org/browse/libgd")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git config --local submodule.libgd.url "$srcdir/libgd"
  git submodule update

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-schemas-compile
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
